import request from '@/utils/request'

// 查询申请领用明细列表
export function listDetails(query) {
  return request({
    url: '/labdanger/details/list',
    method: 'get',
    params: query
  })
}

export function queryDetails(query) {
  return request({
    url: '/labdanger/details/query',
    method: 'get',
    params: query
  })
}
// 查询申请领用明细详细
export function getDetails(occupationDetailsId) {
  return request({
    url: '/labdanger/details/' + occupationDetailsId,
    method: 'get'
  })
}

// 新增申请领用明细
export function addDetails(data) {
  return request({
    url: '/labdanger/details',
    method: 'post',
    data: data
  })
}

// 出库
export function deliver(data) {
  return request({
    url: '/labdanger/details/deliver',
    method: 'post',
    data: data
  })
}

// 修改申请领用明细
export function updateDetails(data) {
  return request({
    url: '/labdanger/details',
    method: 'put',
    data: data
  })
}

// 删除申请领用明细
export function delDetails(occupationDetailsId) {
  return request({
    url: '/labdanger/details/' + occupationDetailsId,
    method: 'delete'
  })
}

// 导出申请领用明细
export function exportDetails(query) {
  return request({
    url: '/labdanger/details/export',
    method: 'get',
    params: query
  })
}